# Maintainer: Alexey Pavlov <alexpux@gmail.com>

_realname=Net-DNS
pkgname=perl-${_realname}
pkgver=0.83
pkgrel=1
pkgdesc="Perl Module: Interface to the DNS resolver."
arch=('i686' 'x86_64')
license=('PerlArtistic')
url="http://search.cpan.org/dist/${_realname}/"
groups=('perl-modules')
depends=('perl-Digest-HMAC' 'perl-Net-IP' 'perl')
checkdepends=('perl-Test-Pod')
options=('!emptydirs')
source=("http://www.cpan.org/authors/id/N/NL/NLNETLABS/Net-DNS-$pkgver.tar.gz")
sha1sums=('1e0f7a3640125c5d7511324e516620ae25cac99f')

prepare() {
  cd "$srcdir/${_realname}-${pkgver}"
}

build() {
  cd "$srcdir/${_realname}-${pkgver}"
  # install module in vendor directories.
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "$srcdir/${_realname}-${pkgver}"
  make test
}

package() {
  cd "$srcdir/${_realname}-${pkgver}"
  make install DESTDIR="${pkgdir}"
}

